package org.example.blog.mapper;

import org.apache.ibatis.annotations.Mapper;

import org.apache.ibatis.annotations.Select;
import org.example.blog.model.UserInfo;

@Mapper
public interface UserInfoMapper {
    /*
    * 根据用户名
    * 查询用户信息
    * */
    @Select("select * from user where delete_flag = 0 and user_name = #{userName} ")
    UserInfo selectByName(String userName);
    

    /*
    * 根据用户ID，查询用户信息*/
    @Select("select * from user where delete_flag = 0 and id = #{id}")
    UserInfo selectById(Integer id);

}
